
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ProduceBasicData.Domain.Entities
{
    /// <summary>
    /// 通知模型
    /// </summary>
    [Table("Notification")]
    public class NotificationModel : BaseModel
    {
        /// <summary>
        /// 通知标题
        /// </summary>
        [StringLength(200)]
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 通知内容
        /// </summary>
        [Required]
        [StringLength(1000)]
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 通知类型 (1: 工单通知, 2: 报工单通知, 3: 系统通知)
        /// </summary>
        [Required]
        public int Type { get; set; }

        /// <summary>
        /// 通知标签
        /// </summary>
        [StringLength(50)]
        public string Tag { get; set; } = string.Empty;

        /// <summary>
        /// 工单编号
        /// </summary>
        [StringLength(100)]
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 报工单号
        /// </summary>
        [StringLength(100)]
        public string? ProductionReportCode { get; set; }

        /// <summary>
        /// 优先级 (1: 低, 2: 中, 3: 高, 4: 紧急)
        /// </summary>
        [Required]
        public int Priority { get; set; }

        /// <summary>
        /// 是否已读
        /// </summary>
        [Required]
        public bool IsRead { get; set; } = false;

        /// <summary>
        /// 接收用户ID
        /// </summary>
        public int? UserId { get; set; }

        /// <summary>
        /// 接收用户名
        /// </summary>
        [StringLength(100)]
        public string? UserName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [StringLength(100)]
        public string CreateName { get; set; } = string.Empty;
    }
}

